home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / demos / OpenGL / README < prev   
Text File  |  1996-11-11  |  16KB  |  436 lines

  1.  
  2.                       toolbox/src/demos/OpenGL README
  3.  
  4.  
  5.              The executables in this opengl subtree were built 
  6.                       on an IRIX 6.2 software platform.
  7.  
  8.  
  9. For other OpenGL "haunts", See Also:
  10.    * OpenGL: FROM THE EXTENSIONS TO THE SOLUTIONS Training Course materials
  11.    * OpenGL documentation tree
  12.    * OpenGL example source code tree
  13.    * OpenGL 1 & 2 classes source trees
  14.  
  15.          This subtree contains OpenGL (some new/some old) demo source
  16.    for atlantis, backtrace, drip, fadeflip, fontflip, globe, glutduck, ideas,
  17.         insect lorenz, puzzle, space, stonehenge, tex_cube, and walker.
  18.  
  19. Eight demos use libglut.a from Mark Kilgard's OpenGL Utility Toolkit, (GLUT):
  20.    * atlantis
  21.    * globe
  22.    * glutduck
  23.    * ideas
  24.    * lorenz
  25.    * puzzle
  26.    * stonehenge
  27.    * walker
  28.  
  29.      A pre-built libglut.a library is included in the lib directory.
  30.      This library is built from the source living in
  31.      ../../exampleCode/opengl/GLUT/lib/glut/, release 3.1 of the OpenGL
  32.      Utility Toolkit resident on the Toolbox.
  33.  
  34. Five demos use the OpenGL Motif Widget, libGLw.a:
  35.  
  36.    * backtrace
  37.    * drip
  38.    * fadeflip
  39.    * fontflip
  40.    * stonehenge
  41.  
  42. One demo uses the OpenGL Character Renderer, libGLC.a:
  43.  
  44.    * fontflip
  45.  
  46. One "hold-out" still uses libtk, a library supplying simple windowing, event
  47. handling, and more using only Xlib:
  48.    * insect
  49.  
  50.      NOTE: The OpenGL people in engineering are attempting to move
  51.      beyond libtk, and, in the longer run, libaux. Mark Kilgard's
  52.      libglut is a much more "current generation" toolkit offerring many
  53.      useful features for those who are not already "X gods".
  54.  
  55. ALL use the GL and GLU OpenGL libraries except for space (which only uses GL):
  56.    * atlantis
  57.    * backtrace
  58.    * drip
  59.    * fadeflip
  60.    * fontflip
  61.    * globe
  62.    * glutduck
  63.    * ideas
  64.    * insect
  65.    * lorenz
  66.    * puzzle
  67.    * stonehenge
  68.    * tex_cube
  69.    * walker
  70.  
  71. -------------------------------------------------------------------------------
  72.  
  73.    * atlantis: sharks, whales, and dolphins living side-by-side in harmony
  74.    * visit the atlantis directory
  75.  
  76.      To Run:
  77.             % atlantis [-dr] [-ir] [-f file.rgb]
  78.             -dr           run in direct render mode (rendering goes
  79.                           directly to the hardware)
  80.             -ir           run in indirect render mode (rendering goes
  81.                           through the X server)
  82.             -f file.rgb   by specifying a .rgb file, atlantis will use
  83.                           the image to simulate the water reflection
  84.                           off the fishes
  85.             mouse buttons pressed while mouse held stationary:
  86.             LEFTMOUSE   - translate "to the left and up"
  87.             MIDDLEMOUSE - rotate "to the right and down"
  88.             RIGHTMOUSE  - translate away from the eyepoint
  89.             r/R KEY     - reset view as when window first came up
  90.             ESC         - exit program
  91.      Demonstrates:
  92.             Lighting, animation capabilities, texture-mapping.
  93.  
  94.  
  95.  
  96.    * backtrace: Simulates caustics like those produced by reverse ray tracing
  97.    * visit the backtrace directory
  98.  
  99.      To Run:
  100.             % backtrace
  101.             RIGHTMOUSE  - rotates around the z axis
  102.             MIDDLEMOUSE - changes radius
  103.             LEFTMOUSE   - changes phi (azimuth)
  104.             ESC         - exit program
  105.             To select a light, click (any MOUSEBUTTON) on it.
  106.             For a non-interactive demo, select "Rotate Automatically"
  107.             under the "Motion" menu.
  108.      Comments:
  109.             Should run pretty quickly on most systems as long as the
  110.             texture mapping is turned off.
  111.  
  112.  
  113.  
  114.    * drip: Makes little droplets of color.
  115.    * visit the drip directory
  116.  
  117.      To Run:
  118.             % drip [-r[number]] [-f] [-w]
  119.             every new MOUSEBUTTON press makes another expanding drop
  120.             LEFTMOUSE   - make expanding red drops
  121.             MIDDLEMOUSE - make expanding green drops
  122.             RIGHTMOUSE  - make expanding blue drops
  123.             ESC         - exit program
  124.             -r          - makes random drops for non-interactive demo.
  125.                           Without the -r option, pressing
  126.                           LEFT/MIDDLE/RIGHT -MOUSE buttons makes
  127.                           drops of color.
  128.             -f          - run in fullscreen mode
  129.             -w          - set the background to WHITE
  130.      Demonstrates:
  131.            2D graphics
  132.            Blending functions.
  133.      Comments:
  134.             Not too involved or flashy, but should run quickly.
  135.  
  136.  
  137.  
  138.    * fadeflip: Flips a texture-mapped square around
  139.    * visit the fadeflip directory
  140.  
  141.      To Run:
  142.            % fadeflip [file1.rgb] [file2.rgb] [file3.rgb] [...]
  143.            RIGHTMOUSE  - spin the object,
  144.                          release while dragging to give momentum.
  145.            Without filenames, uses defaults.  Files must be square.
  146.            If it complains it can't find the files, you may have
  147.            to give it full pathnames.
  148.      Demonstrates:
  149.            Texture mapping.
  150.      Comments:
  151.             Another small and mildly amusing demo
  152.  
  153.  
  154.  
  155.    * fontflip: demonstrates some of the capabilities of the GLC library.
  156.    * visit the fontflip directory
  157.  
  158.      A string and its bounding box is drawn and can be manipulated in the
  159.      following ways:
  160.        1. The left mouse button translates the origin.
  161.        2. The middle mouse button controls X and Y rotation.
  162.        3. The right mouse button controls Z rotation.
  163.        4. The '+' and '-' keys increase and decrease the scale factor,
  164.           respectively.
  165.        5. The View menu allows the position and rotation to be reset, and
  166.           switches between perspective and orthographic viewports.
  167.        6. The Render Style menu allows you to switch between bitmap,
  168.           polygon, and outline rendering.
  169.        7. The Family menu allows you to select a different font family.
  170.  
  171.  
  172.  
  173.    * globe: Texture-mapped 3D globe, rendered w/Open Inventor
  174.    * visit the globe directory
  175.  
  176.      To Run:
  177.            % globe
  178.            LEFTMOUSE - stops program animation sequence
  179.            RIGHTMOUSE- pop-up menu does "Step" (one frame-at-
  180.                        a-time) and "Toggle Spinning"
  181.  
  182.  
  183.  
  184.    * glutduck: Draw duck pond-swimming, rendered w/Open Inventor
  185.    * visit the glutduck directory
  186.  
  187.      To Run:
  188.            % glutduck
  189.            LEFTMOUSE - stops program animation sequence
  190.            RIGHTMOUSE- pop-up menu does "Step" (one frame-at-
  191.                        a-time) and "Toggle Spinning"
  192.            SPACEBAR  - press-release:  single-step
  193.                        press-hold down:  continuous animation
  194.  
  195.      Comments:
  196.             Based on an example from The Inventor Mentor,
  197.             chapter 13, example 5.
  198.  
  199.  
  200.  
  201.    * ideas: Ideas in Motion, an experiment in real-time animation.
  202.    * visit the ideas directory
  203.  
  204.      To Run:
  205.            % ideas -a
  206.            LEFTMOUSE - restarts program animation sequence
  207.            SPACEBAR  - pause/unpause toggle
  208.            -a          run program continuously
  209.      Comments:
  210.            Should look good on almost any platform.
  211.      Demonstrates:
  212.             Stippling, lighting, animation capabilities.
  213.  
  214.  
  215.  
  216.    * insect: Straight-ahead OpenGL port of thant-gaud's inspiration.
  217.    * visit the insect directory
  218.  
  219.      To Run:
  220.            % insect
  221.            LEFTMOUSE   - pan left or right depending on "x-location"
  222.                          of cursor (ie, left of window center, pan
  223.                          left)
  224.            MIDDLEMOUSE - pan up or down depdning upon "y-location".
  225.                        - both of the above move faster the further
  226.                          away the mouse is from the window center.
  227.            f/F         - toggle's movement of the eye
  228.            ESC         - exit program
  229.  
  230.      Demonstrates:
  231.            Lighting, Colormap (includin 8-bit machines), display
  232.            lists, (hierarchically-defined insect model) animation
  233.            capabilities.
  234.  
  235.  
  236.  
  237.    * lorenz: Ride on/near particles caught in a Lorenz attractor.
  238.    * visit the lorenz directory
  239.  
  240.      To Run:
  241.             % lorenz [-h] [-i] [-x] [-s speed] [-w rot_v] [-g gravity]
  242.             -h          Print this message.
  243.             -i          Print information about the demo.
  244.             -x          Enclose the particles in box made of hexagons
  245.             -s speed    Sets the number of new line segments per
  246.                         redraw interval per line. Default value: 3
  247.             -w rot_v    Spins the hexagons on their centers, box sides
  248.                         on their centers. Hexagons spin at rate rot_v
  249.                         degrees per redraw, box sides spin at -rot_v/2
  250.                         degrees per redraw.
  251.             -g gravity  Sets the strength of the attraction of the eye
  252.                         to the red particle. Actually, it's not
  253.                         gravity since the attraction is proportionate
  254.                         to distance.
  255.                         Default value: 0.002. Try large values!
  256.             Executions control:
  257.                   step through single frames
  258.                 g           begin continuous frames
  259.                 s           stop continuous frames
  260.      Comments:
  261.             shows particles stuck in a Lorenz attractor (parameters
  262.             used are r=28, b=8/3, sigma=10). The eye is attracted to
  263.             the red particle, with a force directly proportional to
  264.             distance.  A command line argument puts the particles
  265.             inside a box made of hexagons, helping to maintain the
  266.             sense of 3 dimensions, but it can slow things down. Other
  267.             options allow you to play with the redraw rate and
  268.             gravity.
  269.  
  270.             For general info on Lorenz attractors see "An Introduction
  271.             to the Lorenz Equations", IEEE Transactions on Circuits
  272.             and Systems, August '83.
  273.  
  274.             BUGS:  hidden surface removal doesn't apply to hexagons,
  275.                    and works poorly on lines when they are too close
  276.                    together.
  277.  
  278.             NOTES ON OPENGL PORT:
  279.                    The timer functions do not exist in OpenGL, so the
  280.                    drawing occurs in a continuous loop, controlled by
  281.                    step, stop and go input from the keyboard.
  282.                    (Perhaps system function could be called to
  283.                    control timing.)
  284.  
  285.  
  286.  
  287.    * puzzle: Move pieces in the proper order to solve the puzzle
  288.    * visit the puzzle directory
  289.  
  290.      To Run:
  291.             % puzzle
  292.             r   Reset puzzle
  293.             s   Solve puzzle (may take a few seconds to compute)
  294.             d   Destroy a piece - makes the puzzle easier
  295.             b   Toggles the depth buffer on and off
  296.             RIGHTMOUSE spins the puzzle
  297.             LEFTMOUSE  moves pieces
  298.             ESC        exit program
  299.  
  300.  
  301.  
  302.    * space: Simulation of the Solar System and the Milky Way galaxy.
  303.    * visit the space directory
  304.  
  305.             When approaching vicinity of planets or moons actual
  306.             texture-map surfaces or polygons of the spheres are
  307.             able to be made visible.
  308.  
  309.             This demo will run on all current SGI architectures.
  310.             On non-realtime texturing architectures, entering into
  311.             single-buffer mode will enable non-real time options
  312.             with texturing.
  313.  
  314.             questions or comments, please contact Erik Lindholm:
  315.             erilk@sgi.com or 415/390-1513.
  316.  
  317.               MOUSE CONTROLS
  318.                  left   : accelerates
  319.                  middle : brakes
  320.                  right  : pan/rotate toggle
  321.  
  322.                  left+right   : face nearest moon
  323.                  middle+right : face nearest planet
  324.                  left+middle  : face nearest star
  325.  
  326.               KEY CONTROLS
  327.               Esc   : quit
  328.               Shift : defeat mouse controls (for menu)
  329.               Ctrl  : disconnect view vector from velocity vector
  330.                   a : autopilot
  331.                   b : single buffer mode (< 24bits) (trigger: LEFTMOUSE)
  332.                   h : on screen help toggle
  333.                   i : moons/orbits toggle
  334.                   l : reshade polyplanet every frame
  335.                   n : star name toggle
  336.                   o : planets/orbits toggle
  337.                   q : control panel toggle
  338.                   r : decelerates time by 10
  339.                   s : stellar system statistics
  340.                   t : accelerates time by 10
  341.                   u : user entry mode (use with system statistics)
  342.                   v : reverse velocity
  343.                   x : text display toggle
  344.                   y : time reset
  345.                   z : display constellation boundaries
  346.                   - : time direction toggle
  347.                   up   arrow : increase tesselation level (max: 5)
  348.                   down arrow : decrease tesselation level (min: 0)
  349.                   PrintScrn  : snap rgb image and quit
  350.  
  351.               TEXT COLOR CODES
  352.                  red   : in interplanetary space
  353.                  blue  : in interstellar space
  354.                  yellow: in intergalactic space
  355.                  green : currently being eclipsed
  356.  
  357.               TOURIST SPOTS
  358.                  Sol:          0
  359.                  Sirius:     728
  360.                  Altair(C): 2255
  361.  
  362.  
  363.  
  364.    * stonehenge:  Stonehenge with shadows, textures and atmospheric effects.
  365.    * visit the stonehenge directory
  366.  
  367.      To Run:
  368.             % stonehenge
  369.             on Reality Engines, turn on texture mapping under
  370.             "SPFX" menu.
  371.             Try Turning on "Scale = 1:500" under the "Time" menu
  372.             - if it's too jerky turn it off again.
  373.             May want to set weather.
  374.             The telescope option under the "SPFX" menu gives a little
  375.             telescope which can be moved around using the mouse.
  376.             For a non-interactive demo, select "Demo Mode" under the
  377.             "Misc" menu.
  378.             ESC           exit program
  379.  
  380.      Mouse interface:
  381.             Make sure Demo Mode is turned off.
  382.             LEFTMOUSE   - turn
  383.             MIDDLEMOUSE - horizontal motion changed speed:
  384.                           left to right = forward
  385.                           right to left = backward
  386.             RIGHTMOUSE  - stop motion
  387.  
  388.      Comments:
  389.             May have a couple of bugs.
  390.  
  391.  
  392.  
  393.    * tex_cube: Small texture-mapping demo of a translucent cube.
  394.    * visit the tex_cube directory
  395.  
  396.      To Run:
  397.             % tex_cube [name_of_square_rgb_file]
  398.             Uses a default image if no filename is specified
  399.             Drag with mouse to rotate
  400.             every new MOUSEBUTTON press makes another expanding drop
  401.             ESC         - exit program
  402.             h/H         - halt movement/rotation of cube
  403.             w/W         - reset to initial position
  404.             SPACEBAR    - pause rotation movement toggle
  405.  
  406.  
  407.  
  408.    * walker: Simple forward kinetics animation system.
  409.    * visit the walker directory
  410.  
  411.      To Run:
  412.            % glutduck
  413.            LEFTMOUSE - in Main window:  stops prog animation
  414.                        Rotation Curves window:  move animation
  415.                                                 thru curve plots
  416.            RIGHTMOUSE- pop-up menu does
  417.                        Viewing -> Flying Move
  418.                                   Polar Move
  419.                        Model-> Wire Cubes
  420.                                Solid Cubes
  421.                                Cylinder 1
  422.                                Cylinder 2
  423.                        Toggle Axes
  424.                        Toggle Perspective View
  425.                        Quit
  426.            SPACEBAR  - press-release:  single-step
  427.                        press-hold down:  continuous animation
  428.  
  429.      Comments:
  430.            Although the model only has a few degrees of freedom,
  431.            various sequences (running, jumping, dunking...) are
  432.            implemented.
  433.  
  434. ----------------------------------------------------------------------------
  435. Copyright ⌐ 1995, Silicon Graphics, Inc.
  436.